package com.a01_2021.thousandstimes.instance.service;

import com.a01_2021.thousandstimes.exception.CustomException;
import com.a01_2021.thousandstimes.instance.entity.Vote;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDate;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author E1xP
 * @since 2021-03-28
 */
public interface IVoteService extends IService<Vote> {

    Map<String, Object> getToVote(long userId) throws CustomException;

    Map<String, Object> vote(long userId, List<Vote> voteList) throws CustomException;

    boolean hasNewestVote(LocalDate date);

    boolean isVoteEnough(long userId, LocalDate date);

    List<Vote> getVote(long userId, LocalDate date);
}
